package com.fhz.a1909.day002.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.fhz.a1909.R;


public class LeftFragment extends Fragment {



    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_left, container, false);

        FragmentViewModel fragmentViewModel = new ViewModelProvider(getActivity()).get(FragmentViewModel.class);

        Button viewById = inflate.findViewById(R.id.send);
        viewById.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                fragmentViewModel.select("123123");
            }
        });

        return inflate;
    }
}